import { createApp } from 'vue';
import router from '@/project/crmManage/router/index';
import App from './app';  
import '@/assets/css/tailwind.css';
import { MenuInfo } from '@/domain/authority/types/menu';
import { setRouter } from './utils/menu';
import 'ant-design-vue/dist/antd.min.css';
(async () => { 
  const _menuList: MenuInfo[] = JSON.parse(window.localStorage.getItem('menuList')!);
  if (_menuList) {
    setRouter(_menuList);
  }
})()
  .catch((e) => {
    console.error(e);
    return Promise.reject();
  })
  .then(() => {
    const app = createApp(App);
    app.use(router).mount('#app');
  })
  .catch((e) => { 
  });
